package com.mo;

import cn.hutool.core.thread.ThreadUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 墨渐生微
 * @program mo-all
 * @apiNote
 * @since 2022/9/29
 */
public class PallStream {

    public static void main(String[] args) {

        List<Integer> arrayList = new ArrayList();

        for (int i = 0; i < 10000; i++) {
            arrayList.add(i);
        }


        List<Integer> data = new ArrayList<>();

        arrayList.parallelStream().forEach(i->{
            ThreadUtil.sleep(1);
            System.out.println(i);
        });

//        System.out.println(data.stream().sorted().collect(Collectors.toList()));

    }

}
